# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=secureboot-hook
pkgver=0.2
pkgrel=2
pkgdesc="A kernel hook for generating signed UEFI Unified Kernel Image"
url="https://gitlab.alpinelinux.org/alpine/aports"
arch="noarch !armhf !s390x !ppc64le !loongarch64"  # limited by sbsigntool
license="MIT"
depends="efi-mkuki kernel-hooks initramfs-generator sbsigntool"
install="$pkgname.post-install $pkgname.pre-deinstall"
source="secureboot.hook
	secureboot.conf
	"
options="!check"  # no tests provided

package() {
	local name='secureboot'

	install -D -m755 "$srcdir"/$name.hook "$pkgdir"/usr/share/kernel-hooks.d/$name.hook
	install -D -m644 "$srcdir"/$name.conf "$pkgdir"/etc/kernel-hooks.d/$name.conf
	install -d -m700 "$pkgdir"/etc/uefi-keys
}

sha512sums="
cd76188468f27761a42bf92976e5e0475d3a3a46b24fa44c23c8afb28735f1bf99bac17665cedb1f0bed50eef522b909214f90bca703c7543314ed6ebdffc1b0  secureboot.hook
0777b1ec63d7d21a2144737fb913a52b8deedadbec69b7450799c228950adf9213d5d40e52617841dbae3bf4451f37a18f833e94860fab2c7779779b5fa9f66d  secureboot.conf
"
